package com.lishe.lishe.lishe.module.excitation.interfaces;

import com.lishe.lishe.lishe.bean.DianZanObject;
import com.lishe.lishe.lishe.bean.OrderObject;
import com.lishe.lishe.lishe.module.excitation.bean.AchievementObject;
import com.lishe.lishe.lishe.module.excitation.bean.BannerObject;
import com.lishe.lishe.lishe.module.excitation.bean.CommentObject;
import com.lishe.lishe.lishe.module.excitation.bean.EncourageObject;
import com.lishe.lishe.lishe.module.excitation.bean.HeadInfo;
import com.lishe.lishe.lishe.module.excitation.bean.MineExcitationObject;
import com.lishe.lishe.lishe.module.excitation.bean.MyMessageObject;
import com.lishe.lishe.lishe.module.excitation.bean.PersonImpression;
import com.lishe.lishe.lishe.module.excitation.bean.PersonInfoObject;
import com.lishe.lishe.lishe.module.excitation.bean.UserIntegralObject;
import com.lishe.lishe.lishe.module.excitation.bean.WelfareMessageObject;
import com.lishe.lishe.lishe.module.excitation.bean.WelfareObject;
import com.lishe.lishe.lishe.module.excitation.bean.WelfareOrderObject;
import com.lishe.lishe.lishe.module.excitation.bean.admire.AcceptGiftObject;
import com.lishe.lishe.lishe.module.excitation.bean.company.CompanyInfo;
import com.lishe.lishe.lishe.module.excitation.bean.company.JoinCompany;
import com.lishe.lishe.lishe.module.excitation.bean.company.SearchCompany;
import com.lishe.lishe.lishe.module.excitation.bean.user.UserObject;
import com.lishe.lishe.retrofit.bean.InfoArrayObject;
import com.lishe.lishe.lishe.module.excitation.bean.admire.AdmireObject;
import com.lishe.lishe.lishe.module.excitation.bean.user.UserInfoObject;
import com.lishe.lishe.retrofit.BaseDataPageBody;
import com.lishe.lishe.retrofit.BaseRequestBody;
import com.lishe.lishe.retrofit.bean.DataArrayObject;
import com.lishe.lishe.retrofit.bean.InfoObject;
import com.lishe.lishe.retrofit.bean.UploadInfo;
import com.lishe.lishe.retrofit.presenter.BaseInfoBody;


import io.reactivex.Observable;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;

/**
 * Created by DELL on 2017/11/21.
 * 接口类 被观察者 定义
 */

public interface ExcitationService {

    //获取一企一舍用户信息
    @FormUrlEncoded
    @POST("lshe.framework.protocol.http/api/appComUser/getUserInfo")
    Observable<BaseRequestBody<UserInfoObject>> getUserInfo(@Field("token") String token, @Field("sign") String sign);

    //修改一企一舍用户信息
    @FormUrlEncoded
    @POST("lshe.framework.protocol.http/api/appComUser/updateUserInfo")
    Observable<BaseRequestBody<UploadInfo>> updateUserHeadImage(@Field("token") String token, @Field("userAvatarPath") String userAvatarPath, @Field("sign") String sign);

    //获取福利列表
    @FormUrlEncoded
    @POST("lshe.framework.protocol.http/api/appComUser/getUserWelfareList")
    Observable<BaseRequestBody<BaseDataPageBody<WelfareObject>>> getUserWelfareList(@Field("token") String token, @Field("pageNo") String pageNo, @Field("pageSize") String pageSize, @Field("sign") String sign);

    //获取福利详情信息
    @FormUrlEncoded
    @POST("lshe.framework.protocol.http/api/appComUser/getWelfareDetail")
    Observable<BaseRequestBody<BaseInfoBody<WelfareObject>>> getWelfareDetail(@Field("token") String token, @Field("empId") String empId, @Field("sign") String sign);

    //获取订单状态列表
    @FormUrlEncoded
    @POST("lshe.framework.protocol.http/api/appComUser/getOrderStatusList")
//    Observable<BaseRequestBody<BaseDataPageBody<OrderObject>>> getOrderStatusList(@Field("token") String token, @Field("orderNo") String orderNo, @Field("sign") String sign);//获取订单状态列表
    Observable<BaseRequestBody<BaseDataPageBody<WelfareOrderObject>>> getOrderStatusList(@Field("token") String token, @Field("orderNo") String orderNo, @Field("sign") String sign);//获取订单状态列表

    //获取同事头条列表
    @FormUrlEncoded
    @POST("lshe.framework.protocol.http/api/appComUser/getAppHeadList")
    Observable<BaseRequestBody<BaseDataPageBody<HeadInfo>>> getAppHeadList(@Field("token") String token, @Field("sign") String sign);

    //获取团队激励事件消息列表
    @FormUrlEncoded
    @POST("lshe.framework.protocol.http/api/appComUser/getAppEncourageList")
    Observable<BaseRequestBody<BaseDataPageBody<EncourageObject>>> getAppEncourageList(@Field("token") String token, @Field("sign") String sign);

    //更改用户性别
    @FormUrlEncoded
    @POST("lshe.framework.protocol.http/api/appComUser/updateUserInfo")
    Observable<BaseRequestBody<UploadInfo>> updateUserGender(@Field("token") String token, @Field("gender") String gender, @Field("sign") String sign);

    //更改用户邮箱
    @FormUrlEncoded
    @POST("lshe.framework.protocol.http/api/appComUser/updateUserInfo")
    Observable<BaseRequestBody<UploadInfo>> updateUserEmail(@Field("token") String token, @Field("empEmail") String email, @Field("sign") String sign);

    //更改用户名称
    @FormUrlEncoded
    @POST("lshe.framework.protocol.http/api/appComUser/updateUserInfo")
    Observable<BaseRequestBody<UploadInfo>> updateUserName(@Field("token") String token, @Field("empName") String name, @Field("sign") String sign);

    //获取用户收到鼓励列表
    @FormUrlEncoded
    @POST("lshe.framework.excitation/api/appEncourage/getAdmireList")
    Observable<BaseRequestBody<InfoArrayObject<AdmireObject>>> getAdmireList(@Field("token") String token, @Field("eventId") String eventId, @Field("sign") String sign);

    //点赞墙消息列表接口
    @FormUrlEncoded
    @POST("lshe.framework.excitation/api/appEncourage/getMessageList")
    Observable<BaseRequestBody<BaseDataPageBody<MyMessageObject>>> getMessageList(@Field("token") String token, @Field("sign") String sign);

    //获取一企一舍首页福利领取消息
    @FormUrlEncoded
    @POST("lshe.framework.protocol.http/api/appComUser/getAppWelfareList")
    Observable<BaseRequestBody<BaseDataPageBody<WelfareMessageObject>>> getAppWelfareList(@Field("token") String token, @Field("sign") String sign);


    //获取用户收到礼物列表
    @FormUrlEncoded
    @POST("lshe.framework.excitation/api/appEncourage/getUserAcceptGiftList")
    Observable<BaseRequestBody<InfoArrayObject<AcceptGiftObject>>> getUserAcceptGiftList(@Field("token") String token, @Field("eventId") String eventId, @Field("sign") String sign);  //获取用户收到礼物列表

    //企业激励-点赞墙的banner
    @FormUrlEncoded
    @POST("Businesscircle/Encourage/bannerIndex")
    Observable<DataArrayObject<BannerObject>> getExcitionBanner(@Field("token") String token);

    //企业激励-搜索企业
    @FormUrlEncoded
    @POST("lshe.framework.protocol.http/api/appComUser/getComList")
    Observable<BaseRequestBody<InfoArrayObject<SearchCompany>>> getComList(@Field("token") String token, @Field("comName") String comName, @Field("sign") String sign);

    //企业激励-加入企业
    @FormUrlEncoded
    @POST("lshe.framework.protocol.http/api/appComUser/joinCom")
    Observable<BaseRequestBody<InfoObject<JoinCompany>>> joinCom(@Field("token") String token, @Field("comId") String comId, @Field("empName") String empName, @Field("sign") String sign);

    //激励模块-个人中心-获取用户信息
    @FormUrlEncoded
    @POST("lshe.framework.excitation/api/appEncourage/getUserInfo")
    Observable<BaseRequestBody<InfoObject<PersonInfoObject>>> getUserInfo(@Field("token") String token, @Field("userId") String userId, @Field("sign") String sign);

    //激励模块-个人中心-获取用户成就
    @FormUrlEncoded
    @POST("lshe.framework.excitation/api/appEncourage/getUserAchieveList")
    Observable<BaseRequestBody<InfoArrayObject<MineExcitationObject>>> getUserAchieveList(@Field("token") String token, @Field("userId") String userId, @Field("sign") String sign,@Field("num") int num);

    //激励模块-个人中心-获取用户小礼
    @FormUrlEncoded
    @POST("lshe.framework.excitation/api/appEncourage/getUserGifts")
    Observable<BaseRequestBody<BaseDataPageBody<MineExcitationObject>>> getUserGifts(@Field("token") String token, @Field("userId") String userId, @Field("pageNo") int pageNo, @Field("pageSize") int pageSize, @Field("sign") String sign,@Field("num") int num);

    //激励模块-个人中心-兑换小礼
    @FormUrlEncoded
    @POST("lshe.framework.excitation/api/appEncourage/exchangeGift")
    Observable<BaseRequestBody> exchangeGift(@Field("token") String token, @Field("exchangeGiftIds") String exchangeGiftIds, @Field("sign") String sign);

    //激励模块-个人中心-获取可赠送小礼列表
    @FormUrlEncoded
    @POST("lshe.framework.excitation/api/appEncourage/searchEncourageGifts")
    Observable<BaseRequestBody<InfoArrayObject<MineExcitationObject>>> searchEncourageGifts(@Field("token") String token, @Field("sign") String sign);

    //获取用户积分
    @FormUrlEncoded
    @POST("user/assets")
    Observable<BaseRequestBody<UserIntegralObject>> getUserIntegral(@Field("token") String token, @Field("sign") String sign);

    //赠送小礼
    @FormUrlEncoded
    @POST("lshe.framework.excitation/api/appEncourage/sendGift")
    Observable<BaseRequestBody<UserIntegralObject>> sendGift(@Field("token") String token, @Field("sign") String sign, @Field("giftId") String giftId, @Field("eventUserId") String eventUserId
            , @Field("eventId") String eventId, @Field("pointsType") String pointsType);

    //成就详情
    @FormUrlEncoded
    @POST("lshe.framework.excitation/api/appEncourage/getAchieveDetail")
    Observable<BaseRequestBody<InfoObject<AchievementObject>>> getAchieveDetail(@Field("token") String token, @Field("sign") String sign, @Field("userId") String userId, @Field("achieveId") String achieveId);

    //领取成就奖励
    @FormUrlEncoded
    @POST("lshe.framework.excitation/api/appEncourage/receiveAchieveAward")
    Observable<BaseRequestBody> receiveAchieveAward(@Field("token") String token, @Field("sign") String sign, @Field("userId") String userId, @Field("achieveId") String achieveId);

    //分享成就
    @FormUrlEncoded
    @POST("lshe.framework.excitation/api/appEncourage/shareAchievement")
    Observable<BaseRequestBody> shareAchievement(@Field("token") String token, @Field("sign") String sign, @Field("forwardChannel") String forwardChannel, @Field("achieveId") String achieveId);

    //获取当前公司是否开启激励模块
    @FormUrlEncoded
    @POST("lshe.framework.excitation/api/appEncourage/getComConfig")
    Observable<BaseRequestBody<BaseInfoBody<CompanyInfo>>> getComConfig(@Field("token") String token, @Field("sign") String sign); //获取当前公司是否开启激励模块

    //点赞墙的消息阅读后更新状态
    @FormUrlEncoded
    @POST("lshe.framework.protocol.http/api/appComUser/updateNewsStatus")
    Observable<BaseRequestBody> updateNewsStatus(@Field("id") String id, @Field("token") String token, @Field("sign") String sign);

    //点赞墙的评论
    @FormUrlEncoded
    @POST("lshe.framework.excitation/api/appEncourage/addEventComment")
    Observable<BaseRequestBody> addEventComment(@Field("token") String token, @Field("sign") String sign, @Field("eventComment") String eventComment, @Field("eventId") String eventId);

    //获取用户被赞和点赞列表
    @FormUrlEncoded
    @POST("lshe.framework.excitation/api/appEncourage/getUserEventList")
    Observable<BaseRequestBody<BaseDataPageBody<DianZanObject>>> getUserEventList(@Field("token") String token, @Field("sign") String sign, @Field("userId") String userId, @Field("type") String type, @Field("pageNo") String pageNo, @Field("pageSize") String pageSize);

    //获取用户个人印象
    @FormUrlEncoded
    @POST("lshe.framework.excitation/api/appEncourage/getUserActionList")
    Observable<BaseRequestBody<InfoArrayObject<PersonImpression>>> getUserActionList(@Field("token") String token, @Field("sign") String sign, @Field("userId") String userId);

    //获取点赞详情
    @FormUrlEncoded
    @POST("lshe.framework.excitation/api/appEncourage/getEventDetail")
    Observable<BaseRequestBody<InfoObject<DianZanObject>>> getEventDetail(@Field("token") String token, @Field("sign") String sign, @Field("eventId") String eventId);

    //获取点赞评论列表
    @FormUrlEncoded
    @POST("lshe.framework.excitation/api/appEncourage/getEventCommentList")
    Observable<BaseRequestBody<BaseDataPageBody<CommentObject>>> getEventCommentList(@Field("token") String token, @Field("sign") String sign,
                                                                                     @Field("eventId") String eventId, @Field("pageNo") String pageNo,
                                                                                     @Field("pageSize") String pageSize);

    //对点赞事件鼓励
    @FormUrlEncoded
    @POST("lshe.framework.excitation/api/appEncourage/hitEvent")
    Observable<BaseRequestBody<String>> hitEvent(@Field("token") String token, @Field("sign") String sign,
                                                 @Field("eventId") String eventId);

    //取消对点赞事件鼓励
    @FormUrlEncoded
    @POST("lshe.framework.excitation/api/appEncourage/cancelHitEvent")
    Observable<BaseRequestBody<String>> cancelHitEvent(@Field("token") String token, @Field("sign") String sign,
                                                       @Field("eventId") String eventId);

    //获取点赞墙列表
    @FormUrlEncoded
    @POST("lshe.framework.excitation/api/appEncourage/eventList")
    Observable<BaseRequestBody<BaseDataPageBody<DianZanObject>>> eventList(@Field("token") String token, @Field("sign") String sign,
                                                                           @Field("pageNo") String pageNo, @Field("pageSize") String pageSize);

    //分享点赞列表
    @FormUrlEncoded
    @POST("lshe.framework.excitation/api/appEncourage/shareEvent")
    Observable<BaseRequestBody<String>> shareEvent(@Field("token") String token, @Field("sign") String sign,
                                                   @Field("forwardChannel") String forwardChannel, @Field("eventId") String eventId);

    //获取用户所在所有企业列表
    @FormUrlEncoded
    @POST("lshe.framework.protocol.http/api/appComUser/getUserComAll")
    Observable<BaseRequestBody<InfoArrayObject<CompanyInfo>>> getUserComAll(@Field("token") String token, @Field("sign") String sign);

    //员工离职/退出企业  类型： 1：离职，2：退出
    @FormUrlEncoded
    @POST("lshe.framework.protocol.http/api/appComUser/userQuitCom")
    Observable<BaseRequestBody> userQuitCom(@Field("token") String token, @Field("sign") String sign, @Field("comId") String comId, @Field("type") String type); //员工离职/退出企业  类型： 1：离职，2：退出

    //获取企业和员工信息
    @FormUrlEncoded
    @POST("lshe.framework.protocol.http/api/appComUser/getUserAndComInfo")
    Observable<BaseRequestBody<InfoObject<UserObject>>> getUserAndComInfo(@Field("token") String token, @Field("sign") String sign, @Field("comId") String comId);

    //获取用户所在企业数量
    @FormUrlEncoded
    @POST("lshe.framework.protocol.http/api/appComUser/getComSize")
    Observable<BaseRequestBody<InfoObject<Integer>>> getComSize(@Field("token") String token, @Field("sign") String sign);
}
